/*
 * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package top.continew.admin.auth.model.req;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 微信小程序登录请求参数
 *
 * @author Charles7c
 * @since 2024/12/26 10:00
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "微信小程序登录请求参数")
public class WechatMiniappLoginReq extends LoginReq {

    /**
     * 登录凭证（通过 wx.login 获取）
     */
    @Schema(description = "登录凭证", example = "081Kq4Ga1Q4d3J0FQGGa1elzqd4Kq4Gm")
    @NotBlank(message = "登录凭证不能为空")
    private String code;

    /**
     * 用户昵称
     */
    @Schema(description = "用户昵称", example = "微信用户")
    private String nickname;

    /**
     * 用户头像
     */
    @Schema(description = "用户头像", example = "https://thirdwx.qlogo.cn/mmopen/vi_32/...")
    private String avatar;

    /**
     * 用户性别（0：未知、1：男、2：女）
     */
    @Schema(description = "用户性别", example = "1")
    private Integer gender;
}